<template>
	<view>
		<view v-if="reviewList.length==0" class="nodata" >
			<view class="text">暂无记录</view>
		</view>
		<view v-for="(item ,index) in reviewList" :key="index">
			<view class="review-content">
				<view class="item">
					<view class="pay">{{item.payWay=="ONLINE"?"线上支付":"线下支付"}}</view>
					<view class="date">{{item.tranDate}}</view>
				</view>
				<view class="item" style="margin-top: 20upx;">
					<view class="id">{{item.id}}</view>
					<view class="money">{{item.money}}</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				reviewList: []
			}
		},
		onLoad(options) {
			uni.setNavigationBarTitle({
				title: "付款记录"
			});
			let orderId = options.orderId;
			uni.request({
				url: getApp().globalData.baseUrl + 'order/tranrecord/list',
				method: 'GET',
				data: {
					"orderId": orderId,
					"status": "1",
					 "limit": -1
				},
				header: {
					"token": getApp().globalData.token
					//"token":"4ac4c3f4d37e7173c7c7d33024b45f83"
				},
				success: res => {
					console.log(res);
					this.reviewList = res.data.data.list;
				
				},
				fail: () => {},

			});
		},
		methods: {

		}
	}
</script>

<style>
	.nodata {
		width: 100%;
		margin-top: 100px;
		display: flex;
		flex-direction: column;
		align-items: center
	}
    
	.nodata .text {
		font-size: 32upx;
		color: #333333;
	}

	.review-content {
		display: flex;
		flex-direction: column;
		padding: 20upx;
		border-bottom: solid 1px #e9e9e9;
	}

	.review-content .item {
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.review-content .item .pay {
		font-size: 28upx;
		color: #333333;
		flex: 1;
	}

	.review-content .item .date {
		font-size: 24upx;
		color: #999999;
	}

	.review-content .item .id {
		font-size: 24upx;
		color: #999999;
		flex: 1;
	}

	.review-content .item .money {
		font-size: 32upx;
		color: #FF0000;
	}
</style>
